Anton Lydike — Blog
Website GitHub

Running BAR on NixOS

Written: 2025-08-01
Tags: #snippet #how-to #nixos

Beyond all reason is a great game. It's open source, free to play, massive, and massively fun. It's a spiritual successor to Total Annihilation-style games, and just feel extremely nice. They have so many quality-of-life features for controlling units and such, it really is a lot of fun to play.

I have not yet been able to compile the Recoil Engine from scratch to run the game, but luckily they provide a much friendlier way of distribution: an AppImage.

Like most games, lutris has a good install script on their platform that almost works on NixOS. The installer will download the AppImage for you and place it in the folder you select. It will also create a lutris launcher entry for you. To amend the installation to work on NixOS, you need to do the following:

  1. Create a shell.nix next to the appimage that contains:
{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    # nativeBuildInputs is usually what you want -- tools you need to run
    nativeBuildInputs = with pkgs.buildPackages; [ appimage-run ];
    LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
    stdenv.cc.cc.lib
    SDL2
    libogg
    libvorbis
    openal
    libGL
    libGLU
    zlib
    "/run/opengl-driver"
    "/run/opengl-driver-32"
    ];
}
  1. Open lutris, set the game options to:
    • Executable: /run/current-system/sw/bin/nix-shell
    • Arguments: shell.nix --run "appimage-run BAR.AppImage"
    • Working Directory: the folder containing both the appimage and the shell.nix file
  2. Launch the game!